//
// CWaterHeightMap.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CWaterHeightMap extends UWaterHeightMap {
  private long swigCPtr;

  public CWaterHeightMap(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CWaterHeightMap_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CWaterHeightMap obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CWaterHeightMap(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void animate(float deltaT) {
    nel3dJNI.CWaterHeightMap_animate(swigCPtr, this, deltaT);
  }

  public void setSize(long size) {
    nel3dJNI.CWaterHeightMap_setSize(swigCPtr, this, size);
  }

  public long getSize() {
    return nel3dJNI.CWaterHeightMap_getSize(swigCPtr, this);
  }

  public void setUserPos(int x, int y) {
    nel3dJNI.CWaterHeightMap_setUserPos(swigCPtr, this, x, y);
  }

  public void getUserPos(SWIGTYPE_p_int x, SWIGTYPE_p_int y) {
    nel3dJNI.CWaterHeightMap_getUserPos(swigCPtr, this, SWIGTYPE_p_int.getCPtr(x), SWIGTYPE_p_int.getCPtr(y));
  }

  public void perturbate(int x, int y, int radius, float intensity) {
    nel3dJNI.CWaterHeightMap_perturbate__SWIG_0(swigCPtr, this, x, y, radius, intensity);
  }

  public void perturbate(SWIGTYPE_p_NLMISC__CVector2f pos, float strenght, float radius) {
    nel3dJNI.CWaterHeightMap_perturbate__SWIG_1(swigCPtr, this, SWIGTYPE_p_NLMISC__CVector2f.getCPtr(pos), strenght, radius);
  }

  public void perturbatePoint(int x, int y, float intensity) {
    nel3dJNI.CWaterHeightMap_perturbatePoint__SWIG_0(swigCPtr, this, x, y, intensity);
  }

  public void perturbatePoint(SWIGTYPE_p_NLMISC__CVector2f pos, float strenght) {
    nel3dJNI.CWaterHeightMap_perturbatePoint__SWIG_1(swigCPtr, this, SWIGTYPE_p_NLMISC__CVector2f.getCPtr(pos), strenght);
  }

  public float getHeight(SWIGTYPE_p_NLMISC__CVector2f pos) {
    return nel3dJNI.CWaterHeightMap_getHeight(swigCPtr, this, SWIGTYPE_p_NLMISC__CVector2f.getCPtr(pos));
  }

  public SWIGTYPE_p_float getPointer() {
    long cPtr = nel3dJNI.CWaterHeightMap_getPointer(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
  }

  public SWIGTYPE_p_float getPrevPointer() {
    long cPtr = nel3dJNI.CWaterHeightMap_getPrevPointer(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
  }

  public float getBufferRatio() {
    return nel3dJNI.CWaterHeightMap_getBufferRatio(swigCPtr, this);
  }

  public void enableWaves(boolean enabled) {
    nel3dJNI.CWaterHeightMap_enableWaves__SWIG_0(swigCPtr, this, enabled);
  }

  public void enableWaves() {
    nel3dJNI.CWaterHeightMap_enableWaves__SWIG_1(swigCPtr, this);
  }

  public boolean areWavesEnabled() {
    return nel3dJNI.CWaterHeightMap_areWavesEnabled(swigCPtr, this);
  }

  public void setWaves(float intensity, float period, long radius, boolean border) {
    nel3dJNI.CWaterHeightMap_setWaves(swigCPtr, this, intensity, period, radius, border);
  }

  public float getWaveIntensity() {
    return nel3dJNI.CWaterHeightMap_getWaveIntensity(swigCPtr, this);
  }

  public float getWavePeriod() {
    return nel3dJNI.CWaterHeightMap_getWavePeriod(swigCPtr, this);
  }

  public long getWaveImpulsionRadius() {
    return nel3dJNI.CWaterHeightMap_getWaveImpulsionRadius(swigCPtr, this);
  }

  public boolean getBorderWaves() {
    return nel3dJNI.CWaterHeightMap_getBorderWaves(swigCPtr, this);
  }

  public void setDamping(float damping) {
    nel3dJNI.CWaterHeightMap_setDamping(swigCPtr, this, damping);
  }

  public float getDamping() {
    return nel3dJNI.CWaterHeightMap_getDamping(swigCPtr, this);
  }

  public void setFilterWeight(float filterWeight) {
    nel3dJNI.CWaterHeightMap_setFilterWeight(swigCPtr, this, filterWeight);
  }

  public float getFilterWeight() {
    return nel3dJNI.CWaterHeightMap_getFilterWeight(swigCPtr, this);
  }

  public void setUnitSize(float unitSize) {
    nel3dJNI.CWaterHeightMap_setUnitSize(swigCPtr, this, unitSize);
  }

  public float getUnitSize() {
    return nel3dJNI.CWaterHeightMap_getUnitSize(swigCPtr, this);
  }

  public void setDate(long value) {
    nel3dJNI.CWaterHeightMap_Date_set(swigCPtr, this, value);
  }

  public long getDate() {
    return nel3dJNI.CWaterHeightMap_Date_get(swigCPtr, this);
  }

  public void serial(IStream f) {
    nel3dJNI.CWaterHeightMap_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public void setName(String name) {
    nel3dJNI.CWaterHeightMap_setName(swigCPtr, this, name);
  }

  public String getName() {
    return nel3dJNI.CWaterHeightMap_getName(swigCPtr, this);
  }

  public CWaterHeightMap() {
    this(nel3dJNI.new_CWaterHeightMap(), true);
  }

  public void setPropagationTime(float time) {
    nel3dJNI.CWaterHeightMap_setPropagationTime(swigCPtr, this, time);
  }

  public float getPropagationTime() {
    return nel3dJNI.CWaterHeightMap_getPropagationTime(swigCPtr, this);
  }

}
